package com.distribute.rest.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.distribute.rest.service.ItemService;
import com.distribute.common.pojo.DistributeResult;

/**
 *宠物信息Controller
 * <p>Title: ItemController</p>
 * @version 1.0
 */
@Controller
@RequestMapping("/item")
public class ItemController {

	@Autowired
	private ItemService itemService;
	
	@RequestMapping("/info/{itemId}")
	@ResponseBody
	public DistributeResult getItemBaseInfo(@PathVariable Long itemId) {
		DistributeResult result = itemService.getItemBaseInfo(itemId);
		return result;
	}
	
	@RequestMapping("/desc/{itemId}")
	@ResponseBody
	public DistributeResult getItemDesc(@PathVariable Long itemId) {
		DistributeResult result = itemService.getItemDesc(itemId);
		return result;
	}
	
}
